package com.aikon.wht.designPattern.moduleMethod;

/**
 * Created by haitao.wang on 2016/12/13.
 */
public abstract class AbstractCookMeat {

    String meatType;

    public AbstractCookMeat(String meatType) {
        this.meatType = meatType;
    }

    public void cookMeat() {
        buyMeat(meatType);
        washMeat(meatType);
        cook();
    }

    protected abstract void cook();

    private void washMeat(String meatType) {
        System.out.println("Wash meat:"+meatType);
    }

    private void buyMeat(String meatType) {
        System.out.println("Buy meat:"+meatType);
    }

}
